table layout and each loop