refactor neighbor detection to more intention revealing interfaces