revised row and span formatting