Update README for the latest api changes

and fixed bug with previous version