turn vertical list to horizontal list