problem 5
problem 7 and fixed pr3