Reimplemented dataset selection algorithm
Optimization of dataset selection algorithm