tweaked course import function.