solved prob 28, with test