added js change to mode