moved stop/start actions out to functions