changed exit to return