Add docstring and more tests for comp