Made calculation function private.