Class based index

change the hardcoding.  Does not function as-is.