Ok start from the beginning with the assignment, what exactly has changed betwean the 2 codes you have been given? Can you identify what functions you need to add by looking at these changes? Can you identify what part of the code those functions should replace?

Compare the code line by line and not down difference in functions and where that function appears and so on.