I implemented the Assignment 2.