wrote the finish() function for last question

pretty much.

Note: Can’t test before it’s all written :)