add function in coursem and coursem_controller