added client side code in progress