Extracted common value calculation logic to baseclass