created table using for.Each loops