solution to prob 27