partitioning algorithms are segregated into a separate module