allow arbitrary number of partitions