first cut at implementation, and one test case