output reads in the proper order