adjust the API
fix a bug
Merge pull request #2410 from yorkerlin/develop

adjust the API of KL methods for the notebook