replace data-of by functor