Replace while w/ dotimes in transpose-windows