finished homework 2.