for measuring the depth