changed index.html to use js instead of php