Finishing up homework 2