more tests for criteria, and tweaked error handing