Add tests and helper