updated answers for homework 3