changed an if to an elif so we don't run a command twice