 			//update the weight updaters
 			mAlpha = (mAlphaVShift + mAlphaVMult / (1 + exp( (epoch+1) * mAlphaHMult + mAlphaHShift ) ));
 			vAlpha = (vAlphaVShift + vAlphaVMult / (1 + exp( (epoch+1) * vAlphaHMult + vAlphaHShift ) ));
-			neighbourhood = min( mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) ),
-								 vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) ) );
-			
-			if( ((neighbourhood * (double) currentMapSize[0] <= 8.0 ) && (currentMapSize[0] < information.KohonenMapSize[0])) ){
+			mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
+							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+			vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
+							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+			neighbourhood = min( mNeigh, vNeigh );
+						
+			if( ((neighbourhood <= 8.0 ) && (currentMapSize[0] < information.KohonenMapSize[0])) ){
 				grid = dim3 ((2*currentMapSize[0]*currentMapSize[1]-1)/NUMTHREADS+1, 1, 1);
 				DoubleMapSizeInX<<<grid, threads, 0, *stream>>>( device_KohonenMap, device_tempSpace, currentMapSize[0], currentMapSize[1] );
 				currentMapSize[0] *= 2;
 				#ifdef DEBUGGING
 					printf("Updating size to (%d,%d)\n", currentMapSize[0],currentMapSize[1]);
 				#endif
-			}
-
-			if( ((neighbourhood * (double) currentMapSize[1] <= 8.0) && (currentMapSize[1] < information.KohonenMapSize[1])) ){
+				
+				//update the neighbourhood
+				mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
+								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+				vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
+								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+
+			}
+
+			if( ((neighbourhood <= 8.0) && (currentMapSize[1] < information.KohonenMapSize[1])) ){
 				grid = dim3 ((2*currentMapSize[0]*currentMapSize[1]-1)/NUMTHREADS+1, 1, 1);
 				DoubleMapSizeInY<<<grid, threads, 0, *stream>>>( device_KohonenMap, device_tempSpace, currentMapSize[0], currentMapSize[1] );
 				currentMapSize[1] *= 2;
 				#ifdef DEBUGGING
 					printf("Updating size to (%d,%d)\n", currentMapSize[0],currentMapSize[1]);
 				#endif
-			}
-
-			//update the neighbourhood
-			mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
-							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
-			vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
-							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+				
+				//update the neighbourhood
+				mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
+								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+				vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
+								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
+
+			}
 
 		}
 

	dim3 grid((currentMapSize[0]*currentMapSize[1]-1)/NUMTHREADS+1, 1, 1);
	dim3 threads(NUMTHREADS, 1, 1);
	for(int j = 0; j < information.NumberOfDimensions; j++ ){
		SetBufferToConstant<<<grid, threads, 0, *stream>>>(device_KohonenMap+(2*j)*currMapSize, 0.5*(range[2*j+1]+range[2*j]), currMapSize);
		SetBufferToConstant<<<grid, threads, 0, *stream>>>(device_KohonenMap+(2*j+1)*currMapSize, information.Weights[j], currMapSize);
	}


			//update the weight updaters
			mAlpha = (mAlphaVShift + mAlphaVMult / (1 + exp( (epoch+1) * mAlphaHMult + mAlphaHShift ) ));
			vAlpha = (vAlphaVShift + vAlphaVMult / (1 + exp( (epoch+1) * vAlphaHMult + vAlphaHShift ) ));
			mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
			vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
							sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
			neighbourhood = min( mNeigh, vNeigh );
						
			if( ((neighbourhood <= 8.0 ) && (currentMapSize[0] < information.KohonenMapSize[0])) ){
				grid = dim3 ((2*currentMapSize[0]*currentMapSize[1]-1)/NUMTHREADS+1, 1, 1);
				DoubleMapSizeInX<<<grid, threads, 0, *stream>>>( device_KohonenMap, device_tempSpace, currentMapSize[0], currentMapSize[1] );
				currentMapSize[0] *= 2;
				#ifdef DEBUGGING
					printf("Updating size to (%d,%d)\n", currentMapSize[0],currentMapSize[1]);
				#endif
				
				//update the neighbourhood
				mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
				vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));

			}

			if( ((neighbourhood <= 8.0) && (currentMapSize[1] < information.KohonenMapSize[1])) ){
				grid = dim3 ((2*currentMapSize[0]*currentMapSize[1]-1)/NUMTHREADS+1, 1, 1);
				DoubleMapSizeInY<<<grid, threads, 0, *stream>>>( device_KohonenMap, device_tempSpace, currentMapSize[0], currentMapSize[1] );
				currentMapSize[1] *= 2;
				#ifdef DEBUGGING
					printf("Updating size to (%d,%d)\n", currentMapSize[0],currentMapSize[1]);
				#endif
				
				//update the neighbourhood
				mNeigh = (mnVShift + mnVMult / (1 + exp( (epoch+1) * mnHMult + mnHShift ) )) * 
								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));
				vNeigh = (vnVShift + vnVMult / (1 + exp( (epoch+1) * vnHMult + vnHShift ) )) *
								sqrt((float)(currentMapSize[0]*currentMapSize[0]+currentMapSize[1]*currentMapSize[1]));

			}


		}

