refactoring of metadata