Changed to dynamic row generation