added generic table printing