Complete example for custom handler