refactoring for logic and naming, improve detection
improve test description