Update partitions function