simplified error/exception handling