update index codes
remove unused code