How general purpose is this, assuming there are exactly two sources?