finish function for closing course
fix bug for module methods