Usability improvements based on review feedback
factor out the common validation