add javascript funct