how to make a automatic