modify some RegExp and rename function