update js code for app