Got rid of unused depth function