Implemented shrinkPartition method.