Added the code for xid matching. (The code is not yet enabled)