checking the depth of trench