Completed homework 4