new stream based stuff but tests do not pass