I am not sure if this is the best way to do this or even if I am doing this right. I have a toggle switch that can be on and off, so when it is on it runs the function autoA