Modify problem 2