add clone method
add duplicate method
add get and set for visited, and fix some errors
fix error in duplicate method