Finished homework 2 part 1