use bfs to do the level order traversal