added a different way of partitioning