add basic model logic and tests, comments to follow