updated example to use logicFunction