Understanding the order of conditions