refactored for reek