Added dynamic table link and loop for tables