fixing data-partitioning