clean up process code