refactored doge