added a functor example.