Added shorted path and vistied boolean