adding step functionality to determine when the stream has ended so reader doesn't hang. still hangs though..