adding support for source selection.