close row after loop