various rewrites in progress