broke out lookup and mapping into a subflow