made searchDepth variable