class finalization