Completes forth homework assignment.