public static int binarySearch(int key, int[] list){
		int low = 0;
		int high = list.length - 1;
		int middle = 0;
		while(low <= high){
			middle = low + (high - low)/2;
			if(key < list[middle]) high = middle - 1;
			else if(key > list[middle]) low = middle + 1;
			else return middle;
		}
		return low*(-1);
	}