separating the table printer into its own class