adding check to depth.py