extracting string's to constants
handle exceptions during rule matching