sorting and re_index wip