dding file and changing index