added automatic stat generatioin