updated to work on index.html