working version with exactcount matching