Fixed the homework 3 according to teacher's notes.