added an example for custom callbacks