added minDepth and maxDepth parameters and base them on prctile