problem 4 almost working