added validateAddress method