trying to implement the searching method