changed javascript block on index.html