updating exception handling