Functor class fully implemented