making form error handling way more intelligent