modifed bfs to be dfs w/ a stack