adding result parsing and maximal code