code finalization