added unit tests for last changes