added minDepth.java