removed streaming logic