Finishing up homework 9