fixing broken index,  need to get sort working