engine is now encapsulated in a struct, thanks to runtime.SetFinalizer