edited some javascript