refactoring of streaming executable