allValues need to be flatten for save