Completed homework 2