Adding working (but ugly) version of BFS implementation