now working with validation all functionality works now