Finished written homework 2