improve querying of datasets