add method for model finalization (finalize)