refactor metas storage