fixed some bugs with discount smoother. still some counting issues with the lambdas