fixed refactoring issue in neighbourhood test