added docstrings to model generator