add reverse match module and basic logic