refactoring, fixing wallcounter