exit method