changed the api to handle remove neighbor