depth is calculated