validation and styling