refactored lifetime value calculation to remove duplication