split data into three catagories