add js client functions