add an annotated algorithm. do some logging in unit tests.