refactoring for area discovery