finished prob 8b