unit tests, algorithm