revised some exception handling