this won't necessarily close the last table row. It probably works fine, might be nice to clean up