change schema query for schema reference