If statement reduced to one line