test instance
return a readable stream
refactor