taking a break to practice algorithms, currently working on the refactor into single responsibility