solution to the third homework from spring 2013 3337336