add code and tests
update readme