final version for homework 1