added functionality to API and README.md
.
improver error handling
Merge pull request #3 from olivierrr/master

progress