 			}
 			
 			_sortedValues = new Array();
+			_numOfBins = numOfBins.value;
 			_keyCount = 0;
 			_previousSortedValues.length = 0;
 			

					if(i4 !=0)
					{
						_p = 2;
						for (; _p < numOfBins.value + 1; _p++)
						{
							// if adding this element to an existing class
							// will increase its variance beyond the limit, break

				// despite these arrays having the same values, we need
				// to keep them separate so that changing one does not change
				// the other
				for(var j:int =0; j < _numOfBins+1; j++)
				{
					temp1.push(0);
					temp2.push(0);
