Add Functor code