working on problem3