added tests
bugfixes