finished prob 3.22