smart content algorithm: try to consider leaf div