dataSelector must be passed as function