implementing unit tests
resolving code analysis issues