exception handling works now