removed tempalte/content elements, started loops for generating tables