fine-tuning validation and form submission