updated custom field handling