update createNewRep and change Mod to one line