redesigned table functions