added unit tests and output