Completed homework 3