added docstrings to algorithms module