refactoring metadata