nested depth reduction. added missing(?) return