added the solution to the homework. It wasn't too bad.