public void dfsVisit(GraphNode GN, int depth){
    GN.colour(depth);
    buffer.add(GN);
    ArrayList<GraphNode> children = GN.getChildren();
    
    for(int i=0; i<children.size(); i++){
      
      if((children.get(i).getColour()==0)&&(children.get(i).getChildren()!=null)){
         dfsVisit(children.get(i), depth+1);
      }
      
      else if(children.get(i).getColour()>0){
        numCycles++;
        bufferSave(children.get(i));
        System.out.printf("%d\n", GN.getColour()- children.get(i).getColour()+1);
        
      }
      
      else{} 
    
    }
    buffer.remove(GN);
    GN.colour(-1);
    visited++;
    
  }