change partions from array to map