copied the rough structure of homework1 to homework2