added math and changed transaction table