Implemented the exercises