replace do-of by functor