extract logic into chain wraper - pending recursor