Part 1 of homework