Adjacence checking