add survey change js code to separate file