changed boolean logic in erg validation