snippets neighbour func added