added visited attribute