modify method signature
add optional variable
fix bug
modify exnteds interface
add stream.Stream type
Merge pull request #2698 from horiuchi/bugfix

small bugfix