update js solution