minor improvement to the conditional expressions