removing stats and detector