update JS according to Hugh's email