some more small improvements on the partitioning algorithms