added tests, etc