updated UI with validation