first working version of ec_node_cond (still in progress)