improved data logic on stats