refactor stream method a bit
add spec for argument checking in steam method