updated sumTable to output DF