clean up neighbors code