fixed breadth-first-search, added debugging drawing