Implement exit functionality
Implement Task 3