Refactor to use Enum.reduce