inserted sorted index in the html