send correct index of directory