 
 	const int curVotes = *(hough_space + (n+1)*(numrho + 2)+ (r+1));
 
-	if(curVotes > threshold && curVotes > *(hough_space + (n+1)*(numrho + 2) +
+	/*if(curVotes > threshold && curVotes > *(hough_space + (n+1)*(numrho + 2) +
 				r) && curVotes >= *(hough_space + (n+1)*(numrho +2) + (r+2)) &&
 			curVotes > *(hough_space + n*(numrho +2) + (r+1)) && curVotes >=
 			*(hough_space + (n+2)*(numrho + 2) +  (r+1)))
+	
+	*/
+	if(curVotes > *(hough_space + n*(numrho+2) + (r-1)) && 
+			curVotes > *(hough_space + n*(numrho + 2) + r) && 
+			curVotes > *(hough_space + n*(numrho + 2)+(r+1)) && 
+			curVotes > *(hough_space + n*(numrho + 2) + (r+2)) && 
+			curVotes > *(hough_space + n*(numrho+2) + (r+3)) && 
+			curVotes > *(hough_space + (n+1)*(numrho +2)+ r-1) && 
+			curVotes > *(hough_space + (n+1)*(numrho + 2) + r) && 
+			curVotes > *(hough_space +(n+1)*(numrho +2) + (r+2)) && 
+			curVotes > *(hough_space +(n+1)*(numrho +2) + (r+3)) && 
+			curVotes > *(hough_space +(n+2)*(numrho +2) + (r-1)) && 
+			curVotes > *(hough_space + (n+2)*(numrho +2) + r) && 
+			curVotes > *(hough_space + (n+2)*(numrho +2) + (r+1)) && 
+			curVotes > *(hough_space + (n+2)*(numrho +2) + (r+2)) && 
+			curVotes > *(hough_space + (n+2)*(numrho +2) + (r+3)) && curVotes > threshold)
 	{
 		const float radius = (r - (numrho -1)*0.5f)*rho;
 		const float angle = n*theta;

		const int index = atomicAdd(&g_counter_lines,1);
		if(index < maxLines)
		{
			printf("index Value - %d \n", index);
			printf("Current Votes - %d \n", curVotes);
			printf("radius %f and angle %f \n", radius, angle);
			*(lines + index) = make_float2(radius, angle);
			*(votes + index) = curVotes;

		}

		}
	

		int maxLines = 10;
			
		float2* d_lines;
		int* d_votes;
