added unit tests, fix bug detected on unit tests, added small documentation to relnotes