derive functor