fixed only-wieghts rewriting