restructured results into case/input/test hierarchy