adding support for creating subset of a dataset.