add more regexp rewriting