BFS in Javacl