Completed homework 3.1