refactoring

Refactored logic

All tests pass upon updating source to new file name.