now with validation