got BFS search working, not very memory efficient though