added client side functionality