turn output into list of list