appending all rows to table with functions