Finish courses functions and change the model