feat: general improvements and test coverage
feat(test): add test