Initial generalization

issue: when rowspan > 1 the cells from the next row get shifted left by
the lack of a cell in that row
fixes rowspan issue in generalized version