clean code. add back convert flat vars array to nested array.