Implemented lab 7