implemented the random neighbor operation for tonal theory counterpoint