https://primanota.net/shorty-long/function-at-junction-chords.htm