tweaked error handling
test