replace several eval expressins with calls to get_api_fields