very close to merging back into master
added popStats