added exception handling, more appropriate classname