update js and controller