modify to pipesort data cube