Modifying homework 9