add client side code