Add tests and comment