update function that populates tableview to handle the case of having multiple tableviews coexist;