changed aStr[n] to aStr[n].ord for compatibility
fixing ruby19 compability