make it work with multiple sources