working on client side validation functions