separate data into buckets