added logic unit tests