optimizing the classes index quite a bit