finish refactor system_metadata