starting the find neighbors function