adjust the API for robustness
Merge pull request #2456 from yorkerlin/develop

adjust API for robustness of KL methods