more fixes to P4
problem 4