more features, tests, bug fixes