added unit tests