solution for hw 2 part 2 758770