fixed bug in index.html
deleted some duplicate code