start/stop ap logic