adding build loop over multiple rows - not yet tested