found bug causing miscalculation on some sums when using 'random' date range