added client side logic