add javascript correctly