update queries add get sources func