seperate iterations for row and column, HUGE performance improvements