adjacency checking implemented