refactor meta data api