To do: - [x] Add test to reach 100% coverage - [x] Add comments in the code - [x] Add formulas to docstring and polish docstring (add reference).