update index script, move to scripts