implemented "unsort", the undo counterpart for sort