modify exception handling