Added some code for the depth, but the implementation hangs due to an API problem, I think...