Working insert courses script