added an example of using the api