Problem2 and problem3