Completed the implementation of the assignment.