     public static function isfinite(m:Array):Boolean
     {
         var e:Number;
-        for (var i:int = 0; i < MAX; i++)
+        for (var i:int = 0; i < 20; i++)
         {
             e = m[i];
             if (!isFinite(e))


    private static function moveNonZeroToDiagonal(orig:Array, aug:Array, row:int, col:int):Boolean
    {
        for (var searchRow:int = row + WIDTH; searchRow < MAX; searchRow += WIDTH)
        {
            if (orig[searchRow + col] != 0)
            {

        // [ 15 16 17 18 19 ] [ 0 0 0 1 0 ]
        // [  0  0  0  0  1 ] [ 0 0 0 0 1 ]

        for (row = 0, col = 0; row < 20; row += 5, col++)
        {
            if (orig[row + col] == 0 &&
                !moveNonZeroToDiagonal(orig, aug, row, col))
