added basic client side validation