for i in 0..number.length-1 do # step through the number (mask)
          if number[i].chr =~ /^[X#]$/i
            number[i] = numstr[j] # replaced masked indexes with digits from incrementing number
            j += 1
          end