new architecture with streams
add a test