subpop stats implemented and bugfixes