completed problem3