Implement breadth-first search
Fix typo to match test with error message