finished ch5 programming challenge 12