Updated the API for new version