modify rule pattern matching