change source stream listener signature and refactoring