checking validity by truth table now working