refactored some variables for clarity, stats is now hasStats, and changed redundant checks for if(hasStats == true) to if(hasStats)