did some javascript stuff