implemented a broken version of reorder_pop()