Added "parent" parameter to search method.
Use int for predicate instead of bool.