implemented bfs and queue