simplify code in nested visitor
test for configurationerror