change js set and get outside the foreaCH