changed z to depth