[updated] index sort