trying to define an index class