docstrings, added parameters, added tests