add js functionality for thing