updating js root variable