some refactorings regarding partitions and selections