Completed section 4 of the assignment.