rewrites for migration