optimize conditional statement

I think it clearer.