new metadata and refactor