partitoning algorithms improved