reordering misplaced entries