refactoring for scrutinizer