Merge pull request #47 from leplay/master

fix bugs
 add api