flattens task2 output