public int binarySearch(int searchElement) {
        int low = 0;
        int high = data.length -1;
        int middle = (low+high) / 2;
        int location = -1;
        
        
        do{
            System.out.print(""+remainingElements(low,high));
            
            for(int i = 0; i < middle; i++) {
                System.out.print("  ");
            }
            System.out.println(" * ");
            
            if(searchElement == data[middle]) {
                location = middle;
            }
            
            else if(searchElement < data[middle] ) {
                high = middle-1;
            }
            else{
                low = middle + 1;
            }
            
            
            middle = (low + high + 1) / 2 ;
            
        } while((low <= high) && location == -1);
        return location;
    }