attempted the program part in index.html