refactor stathat