removed streaming
resolve merge
refactored code