Implemented calcAdjacencies()