modify exception message
reformat code