improved RC query