answered all questions for homework 3