Problem 3 a) and b) done