Breadth first search code added