modfiy index code