initial commit. passes some early tests.