change the way to re compiled pattern