Complete the missing functions, and the whole assignment.