completed the assignment code

Hi, here is a pull request just to check out how it works. The code for my assignment2 can be found here.