add sinatra's stream functionality