Updating js code