update docs
add events class
add stream.js