compute values with children margin