simplify the lens block to a ternary operation