parse data into subsets