Added a way to sub-sample data for testing