changed validate to use boolean logic