Rewriting lib.