add get source function