more rewrites WIP