factories the stat logic