major rewrite of playerstats.py