add support for summing both columns and rows in table