code right now is not properly factored and doesn't have any comments to make it more understandable.
code right now is not properly factored and doesn't have any comments to make it more understandable.