complete rewite