fixing lag issue with index2.html