rmed repetitious logic