automatically adjust depth