added client side checks