simplified error handling. closes #10