rewriting clone technique