reverse rewrites and query support