Completed homework 6