working on problem 3
working on problem 2