code re-placement