Re-structured a conditional to be easier to read