add method to pretty print the table and the result