 	custom_vector<long long> potentialCollisions;
 
 	Broadphase broadphaseManager;
-	broadphaseManager.setBinsPerAxis(make_real3(numSpheresPerSide,numSpheresPerSide,numSpheresPerSide));
+	broadphaseManager.setBinsPerAxis(make_real3(numSpheresPerSide, numSpheresPerSide, numSpheresPerSide));
 
 	cout << "Begin parallel broadphase" << endl;
 	double startTime = omp_get_wtime();
 	broadphaseManager.detectPossibleCollisions(aabb_data, potentialCollisions);
 	double endTime = omp_get_wtime();
-	printf("Time to detect: %lf seconds (%d possible collisions)\n", (endTime - startTime),broadphaseManager.getNumPossibleContacts());
+	printf("Time to detect: %lf seconds (%d possible collisions)\n", (endTime - startTime), broadphaseManager.getNumPossibleContacts());
 	cout << "End parallel broadphase\n" << endl;
 	// End Step 3
 
-	assert(broadphaseManager.getNumPossibleContacts()==pow(numSpheresPerSide,3));
-	cout << "TEST PASSED" << endl;
+	if (broadphaseManager.getNumPossibleContacts() == pow(numSpheresPerSide, 3)) {
+		cout << "TEST PASSED" << endl;
+	} else {
+		cout << "TEST FAILED" << endl;
+	}
 
 	return 0;
 }

	// Step 2: Generate aabb_data from spheres
	custom_vector<real3> aabb_data;

	for(int i=0;i<spheres.size();i++)
	{
		real3 temp = spheres[i].pos;
		temp.x-=spheres[i].r;
		temp.y-=spheres[i].r;
		temp.z-=spheres[i].r;
		aabb_data.push_back(temp);
	}
	for(int i=0;i<spheres.size();i++)
	{
		real3 temp = spheres[i].pos;
		temp.x+=spheres[i].r;
		temp.y+=spheres[i].r;
		temp.z+=spheres[i].r;
		aabb_data.push_back(temp);
	}
	// End Step 2


	Sphere sphere;
	int index = 0;
	for (int k = 0; k < numSpheresPerSide; k++) {
		for (int j = 0; j < numSpheresPerSide; j++) {
			for (int i = 0; i < numSpheresPerSide; i++) {
				sphere.pos = make_real3(i * sphereSpacing, j * sphereSpacing, k * sphereSpacing);
				sphere.r = sphereRad;
				sphere.index = index;

