added some javascript code