adapted rewrites