update with validation