added unit test/changed comments