add basic functionality and unit test