add docstrings and fix issue with archive