check the depth