added unit testing
added unit tests