updated README with correct code
Fixed failing tests after change of api