add table.inc.php and move table oriented functions there
use  table oriented functions