Fixed scoping issue & moved getNeigbours