This if block is difficult to read