chaging error handling