repositioned table tags and for loop closing curly braces