Replace repetition with var.