New rewriting system with more expressive semantics