added timer for automatically stopping controller