arrange code in index.html