added unit-testing