exit method works