added logic to support multi-level named sources