update js when program is loaded