add javascript, update index