functional but needs unit analysis. 10/10 pylint score.