working version before validations