ex4 problem 1 done