updated docstrings and headers