rewite part code