refactor course switch,cancel,sum