now index is connected with weight file