added breadthFirstSearch()