factor out Source trait