problem #4 almost done