public LinkedList<Node> findPath()
  {
    //Creating open_list and close_list
    open_list_ = new LinkedList<AStarNode>();
    closed_list_ = new LinkedList<AStarNode>();
    
    
    AStarNode current, start = new AStarNode(map_[start_.x][start_.y].getNode()), 
        goal = new AStarNode(map_[goal_.x][goal_.y].getNode());
    
    start.setGScore(0); // setting  the g score of the start to zero
    
    start.setFScore(calculateDistance(start,goal));
    
    open_list_.add(start); // add starting node to open list
    
    while(!open_list_.isEmpty())
    {
      current = lookingForBestNode(); // get node with lowest f Costs from open list
      
      if (current.equals(goal)) // found goal
        return constructPath(current);
      
      open_list_.remove(current); // delete current node from open list
      closed_list_.add(current); // add current node to closed list
      
      LinkedList<AStarNode> adjacent_nodes = new LinkedList<AStarNode>();

      ArrayList<Node> edges = current.getNode().getEdges();
      if(edges != null)
      {
        for (int idx = 0, size = edges.size(); idx<size; ++idx)
        {
          AStarNode current_edje = map_[edges.get(idx).getPosition().x][edges.get(idx).getPosition().y];
          if(current_edje.isObstacle() || !closed_list_.contains(current_edje))
          {
            adjacent_nodes.add(current_edje);
          }
        }
      }
           
      for (int idx = 0, size = adjacent_nodes.size(); idx<size; ++idx)
      {
        AStarNode current_adj = adjacent_nodes.get(idx);
        if (!open_list_.contains(current_adj)) // node is not in open list
        {
          current_adj.setParentNode(current); // set current node as previous for this node
          current_adj.setGScore(current, COST); // set g costs of this node (costs from start to this node)
          current_adj.setFScore(calculateDistance(current_adj,goal));
          open_list_.add(current_adj);
        }
        else // node is in open list
        {
          // costs from current node are cheaper than previous costs
          if(current_adj.getGScore()> (current.getGScore() + COST)) 
          {
            current_adj.setParentNode(current); // set current node as previous for this node
            current_adj.setGScore(current.getGScore() + COST); // set g costs of this node (costs from start to this node)
          }
        }
      }
    }
    
    return null;
  }