Completed hw6.