Remove code redundance: recalculate only in one place.