add functor and adapt parser for it