implemented a depth limitation for the searches