Implemented the Done button