added else to if statements in command