added validation and styling