Feature/efficient and

here's an impl of efficient-and per your paper, but there are bugs that need to be removed with unit-testing.