changed some javascript