fixed Bread First Search