better method validate