change exit to return