changed the add method
added search method
implemented traverse method with  algorithms