feat: initial implementation, add test cases