add example for error handling