some more rewrites