upgraded gridStar algorithm; combined with other algorithm