initial checkin with implementation and tests