added docstrings
some comments
show m and r