Completed first version of homework 1