split-into-pools fn