fixme: when we have multiple function, there is only one partitions array