Problem3 and problem4 - added