public boolean isPrime(long number){
		int counter = 0;
		long factor = 0;
		boolean isPrime = true;	
		
		if (number==2){
			return true;
		} else if (number%2 == 0){
			return false;
		}
		
		while(isPrime && factor <= number/2){
			if (counter < primeCounter){
				counter = counter + 1;
				factor = Prime[counter];
		    }
			else{ 
				factor = factor + 2;
			}
			
			if (number%factor==0)
				isPrime=false;
		}
		
		return isPrime;
	}