public void addAll(Profile[] p, byte gameID){
        
        Game g = GameFactory.getGameFromID(gameID);
        
        for(int i=0; i<p.length; i++){
            if(profiles.length == size)
                profiles = Arrays.copyOf(profiles, size+3);

            // Check if the profile is already in use
            int updateIndex = -1;
            for(int x=0; x<size; x++){
                if( profiles[x].getGameID() == gameID 
                        && profiles[x].getSaveDir().equalsIgnoreCase(p[i].getSaveDir()) 
                        && profiles[x].getID() == p[i].getID()){
                    updateIndex = x;
                    break;
                }
            }
            if( updateIndex == -1 ){
                // Add the profile
                profiles[size] = p[i].clone(gameID, ++profileIdCounter);
                g.setupProfile(profiles[size]);
                size++;
            } else {
                // Update the profile
                profiles[updateIndex].setImage(p[i].getImage());
                profiles[updateIndex].setName(p[i].getName());
            }
        }
    }