refactor value_set to snapshot