cleaned problem 3