Don't forget to add the finalizer code to the function