checks for repeat commands