some javascript stuff and json