public String getNextStationName(int ID){
                Block b;
                if(getLineColor() == 0)
                    b = trackObject.getBlock((int)trainDistRed[ID-1][2]);
                else
                    b = trackObject.getBlock((int)trainDistGreen[ID-1][2]);
                Block s, next;
                if(getLineColor() == 0)
                    s =  trackObject.getBlock((int)trainDistRed[ID-1][2]);
                else
                    s =  trackObject.getBlock((int)trainDistGreen[ID-1][2]);
                if(s.isStation())
                {
                    int a = s.getPrevBlockId();
                    s =  trackObject.getBlock(a);
                }
                next = s;
                while(true)
                {
                    if(next.isStation())
                    {
                        break;
                    }
                    else
                    {
                        next = trackObject.getBlock(next.getPrevBlockId());
                    }
                }
                
                return next.getStationName();
            }