remove repetitive instructions