history data fix and use lambdas in data collector