Problem 3 done