is this smart enough to recurse through subcases and cases in repeats and stuff?