refactor custom fields