prob 13: solved