working on functor chapter