add ternary operator for catching NaN on caulations for stats