homework #9 resubmitted with updated question #3