refined logic of binding generator