- added implementation and unit tests