first cut of the code and tests, updated readme.md