added unit tests (issue #77)