preserve ordering from input file
hacking