clean up long process code