improve match query
profiling of unit tests