revised problem 4