added partitioning method and updated partitioning algorithms