reshuffled functions, make room for exit