add javascript and change routes