change a js function