added breadth and depth first search