condition logic with an expression