added partitioning