cleaning up client side validation