added client side code, ongoing still