Added code from ksadorf : selection from many sources