add general logic for long stream addition