revised problem 3