update index code, fix unneeded classiness