added a function for printing truth tables