fix depth calculation + standard deviations