Implement Assignment 2.