rename class to index_class.  indent a few lines