add js functions