added exit method