added ability to change api_version