added docstrings
added smoothing keyword