finished fillTable function