added edge removal for non-neighbour nodes