adding adjacency and obstacles