Implementing Assignment 2