See above comment. I think the function can be calculated based on the "currentStats" structure.