new API
Merge pull request #2 from theanh0512/newAPI

new API