tabling functions

some changes, no promises