public String[] sortList(String[] names) {
           
        String tempName;
        boolean complete = false;
        while(complete) {
            
            complete = true; // assume that you done
            for (int i = 0; i < names.length-1; i++) {
                int compareResult = names[i].compareTo(names[i+1]);
                if (compareResult > 0) {
                    // swap names
                    tempName = names[i];
                    names[i] = names[i+1];
                    names[i+1] = tempName;
                    complete = true;
                } 
            }
        } 
        return names;
    }