switched around exit handler to be better