Remove rep when unnecessary