cleaning of problem 3 and problem 4
starting problem 4