added breadth first search and depth first search