refactored lifetime value algorithm and specs