refactor control-stop-atom