added the answer for the homework problem
this is the version that gives the correct answer on the homework