solution for hw 1 part 1 439294