remove repeated instructions