modifying the structure of output