added a class to flatten a given dataset with the given bounding box method