debug for matching