added new function dist_course (returns also N, NO, O, SO, ...)