*finished homework 7, fixed problem 1 and added problem 2