refactoring logic out to separate files to prepare for, additional features