use custom handler to pass context