wrote functions for markVisited(a), unVisitedAll(), isVisited(a)