added unit tests for clarity