problem 2 solved, two different ways