Implemented lab 2.