make functions that create partitions abstract