refactor meta handling