Only runs half of first row of algorithm.js