worked on problem 1