a small refactor was in order