format list of items and list of lists