added basic exceptionahdnling