finalize the object