divide data into diffrent categories