adding partitioning an array