some javascript work