added unit testing