added example usage of api