bug in random neighbor