Homework 3 with corrections