What is the purpose of this if..else statement? I don't understand