Homework 9 reworked