ToDo

need to do sorting, and sort indexing