changed approach, completed impl, tests, docs