simpler way to get courseid