Adding visited boolean
Fixed method header