ad d some validate functinality
structure change, and add the validator