third commit - cycle - bfs traversal