Add basic functionally and a testcase