added tests, increased code coverage