add js functionality