Add support for sampling of data