Since csm can't be null in this functor, i'd suggest using `&` instead of a pointer.