added method to VisualizableSort to get the index of the latest change