The comparisons could be done directly in the `if` instead of creating 3 vars not used most of the time, and for readability.