added function to discretize set data