Updated the example for using the API