Code for Project 2