added implementation and first trivial test case