full working makeTable