more efficient reorder
compute reverse index for moves
Merge pull request #3 from neonstalwart/reorder

more efficient reorder