first attempt at homework 1