added example for api usage