Working on rewriting